package com.yunti.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.domain.entity.SysDept;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 项目管理对象 base_subject
 *
 * @author ruoyi
 * @date 2024-05-20
 */
public class BaseSubject extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 科目id */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 科目名称 */
    @Excel(name = "科目名称")
    private String name;

    /** 科目代码 */
    @Excel(name = "科目代码")
    private String code;

    /** 1:个人，2：团队 */
    @Excel(name = "1:个人，2：团队")
    private Integer type;

    /** 团队分换算规则 */
    @Excel(name = "团队分换算规则")
    private String teamScoreRule;

    /** 是否计入个人分 */
    @Excel(name = "是否计入个人分")
    private Integer personScoreRule;

    /** 满分 */
    @Excel(name = "满分")
    private String totalScore;

    /** 父项目id */
    @Excel(name = "父项目id")
    private Long parentId;

    /** 涉及抽人 */
    @Excel(name = "涉及抽人")
    private Integer lottery;

    /** 人员规则 */
    @Excel(name = "人员规则")
    private String stuRule;

    /** 换算比例 */
    @Excel(name = "换算比例")
    private String convertRate;

    /** 打分人数 */
    @Excel(name = "打分人数")
    private Integer count;

    /** 换算类型  */
    @Excel(name = "换算类型 ")
    private String convertType;

    public List<BaseSubject> getChildren() {
        return children;
    }

    public void setChildren(List<BaseSubject> children) {
        this.children = children;
    }

    /** 子部门 */
    @TableField(exist = false)
    private List<BaseSubject> children = new ArrayList<BaseSubject>();

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return code;
    }
    public void setType(Integer type)
    {
        this.type = type;
    }

    public Integer getType()
    {
        return type;
    }
    public void setTeamScoreRule(String teamScoreRule)
    {
        this.teamScoreRule = teamScoreRule;
    }

    public String getTeamScoreRule()
    {
        return teamScoreRule;
    }
    public void setPersonScoreRule(Integer personScoreRule)
    {
        this.personScoreRule = personScoreRule;
    }

    public Integer getPersonScoreRule()
    {
        return personScoreRule;
    }
    public void setTotalScore(String totalScore)
    {
        this.totalScore = totalScore;
    }

    public String getTotalScore()
    {
        return totalScore;
    }
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }
    public void setLottery(Integer lottery)
    {
        this.lottery = lottery;
    }

    public Integer getLottery()
    {
        return lottery;
    }
    public void setStuRule(String stuRule)
    {
        this.stuRule = stuRule;
    }

    public String getStuRule()
    {
        return stuRule;
    }
    public void setConvertRate(String convertRate)
    {
        this.convertRate = convertRate;
    }

    public String getConvertRate()
    {
        return convertRate;
    }
    public void setCount(Integer count)
    {
        this.count = count;
    }

    public Integer getCount()
    {
        return count;
    }
    public void setConvertType(String convertType)
    {
        this.convertType = convertType;
    }

    public String getConvertType()
    {
        return convertType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("code", getCode())
            .append("type", getType())
            .append("teamScoreRule", getTeamScoreRule())
            .append("personScoreRule", getPersonScoreRule())
            .append("totalScore", getTotalScore())
            .append("parenId", getParentId())
            .append("lottery", getLottery())
            .append("stuRule", getStuRule())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("convertRate", getConvertRate())
            .append("count", getCount())
            .append("convertType", getConvertType())
            .toString();
    }
}
